package cn.fr4nk.crawler.task;

import java.util.Set;

import cn.fr4nk.crawler.pojo.TaskResult;


public interface TaskStoreApi {

	void addCompleted(CrawlerTask task) throws Exception;

	void addFailedTask(CrawlerTask task) throws Exception;

	void addTaskResult(TaskResult result) throws Exception;

	void addTodo(CrawlerTask task) throws Exception;

	boolean containsCompleted(CrawlerTask task);

	CrawlerTask fetchFailedTask() throws Exception;

	TaskResult fetchTaskResult() throws Exception;

	CrawlerTask fetchTodo() throws Exception;

	Set<String> getCompletedTasks();
}
